import java.util.Scanner;

public class text1 {
    public static void main(String[] args) {
        text1  main = new text1 ();
        Scanner scan = new Scanner(System.in);
        int number = scan.nextInt();
        System.out.println(main.isPrimeNumber(number));
    }

    public Boolean isPrimeNumber(int number) {
        int n=2;
        for(;number%n!=0;n++);{
            return n==number? true:false;
        }
       
        //write your code here......


    }
}